/**
 * @author hugo
 *
 */
package com.github.thinwonton.seckill.service;

import java.util.List;

import com.github.thinwonton.seckill.entity.po.Seckill;
import com.github.thinwonton.seckill.entity.web.Exposer;
import com.github.thinwonton.seckill.entity.web.SeckillExecution;
import com.github.thinwonton.seckill.exception.SeckillClosedException;
import com.github.thinwonton.seckill.exception.SeckillException;
import com.github.thinwonton.seckill.exception.SeckillRepeateException;

public interface SeckillService {
	List<Seckill> getSeckillList();

	Seckill getById(long seckillId);

	/**
	 * 秒杀接口暴露
	 * 
	 * @param seckillId
	 * @return
	 */
	Exposer expose(long seckillId);

	SeckillExecution execute(long seckillId, String secretKey, long userid)
			throws SeckillClosedException, SeckillRepeateException, SeckillException;
}